package com.dlc.shop.user.common.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dlc.shop.user.common.model.PopupRelate;

import java.util.List;

/**
 * @author TRACK
 */
public interface PopupRelateService extends IService<PopupRelate> {

    /**
     * 根据弹窗广告id获取弹窗广告关联
     *
     * @param popupId 弹窗广告id
     * @return 弹窗广告关联
     */
    List<PopupRelate> getByPopupId(Long popupId);

    /**
     * 批量保存
     * @param popupRelates 弹窗广告关联
     */
    void saveBatch(List<PopupRelate> popupRelates);

    /**
     * 批量更新
     * @param popupId
     * @param popupRelates
     */
    void updateBatch(Long popupId, List<PopupRelate> popupRelates);

    /**
     * 根据弹窗广告id删除弹窗广告关联
     * @param popupId 弹窗广告id
     */
    void deleteById(Long popupId);

    /**
     * 根据弹窗广告关联id删除弹窗广告关联
     * @param relateIds 弹窗广告关联id
     */
    void deleteByRelateIds(List<Long> relateIds);
}
